package com.x.client.activity

import android.content.Intent
import android.os.Bundle
import android.os.Handler
import com.trello.rxlifecycle2.components.support.RxAppCompatActivity
import com.x.client.App

/**
 *  Creator : GG
 *  Time    : 2017/11/13
 *  Mail    : gg.jin.yu@gmail.com
 *  Explain : 闪屏页
 */
class SplashActivity : RxAppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        Handler().postDelayed({
//            if (App.instance.firstOpen) {
//                val intent: Intent = if (App.instance.getUser() == null)
//                    Intent(this, LoginActivity::class.java)
//                else {
//                    Intent(this, MainActivity::class.java)
//                }
//                startActivity(intent)
//                finish()
//            } else {
                startActivity(Intent(this, MainActivity::class.java))
                finish()
//            }
        }, 2000)

    }

}